package com.sls.game.dao.xinhe.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.sls.game.dao.impl.SuperDAO;
import com.sls.game.dao.xinhe.XinHeGameGiftDAO;
import com.sls.game.pojo.xinhe.XinHeGameGift;

@Repository("xinHeGameGiftDAO")
public class XinHeGameGiftDAOImpl extends SuperDAO<XinHeGameGift> implements
		XinHeGameGiftDAO {

	@Override
	public void insert(XinHeGameGift gift) {
		this.getSqlSession().insert("mybatis.xml.XinHeGameGiftMapper.insert",
				gift);

	}

	@Override
	public void update(XinHeGameGift gift) {
		this.getSqlSession().update("mybatis.xml.XinHeGameGiftMapper.update",
				gift);

	}

	@Override
	public XinHeGameGift queryByGiftId(XinHeGameGift gift) {
		return this.getSqlSession().selectOne(
				"mybatis.xml.XinHeGameGiftMapper.queryByGiftId", gift);
	}

	@Override
	public List<XinHeGameGift> queryGiftByCidAndGid(XinHeGameGift gift) {
		List<XinHeGameGift> list = this.getSqlSession().selectList(
				"mybatis.xml.XinHeGameGiftMapper.queryGiftByCidAndGid", gift);
		return list;
	}

}
